DialogNotCanceled
State = DialogNotCanceled()
 
Parameters: NONE
Returns:

    State = The Cancel State of the last dialog. 0=Dialog Canceled, 1= It wasn't canceled
 

     The DialogNotCanceled returns the cancel state of the last open dialog. The Function is used to check if a user canceled out of previous called dialog. This is mainly useful with those dialog functions return strings. Since it's possible the user could enter a Null string (a string with nothing in it), this just allows us to double check if the user wants to actually use the data return string or not.



FACTS:


      *DialogNotCanceled can only return the state of last called dialog function.



 
Example Source: Download This Example
; Include the Dialogs library in this program
  #Include "PBDialogs"
  
; Clear the Screen to Blue
  Cls RGB(0,0,255)
  
; Init the dialogs TItle and heading message
  Title$="Play Dialog Input Query Box"
  Text$="Enter A New Name"
  
  
; Call the Dialog Function.  This box will
; have a YES & NO option for the users
  Name$=InputQuery(Title$,Text$)
  
; Check if the USER clicked the cancel button
; while using this dialog ? - If they didn't cancel
; then whatever they entered we accept
  If DialogNotCanceled()=true
     
   ;
     Print "You Selected To Change Names To"
     Print Name$
     
  Else
     Print "You Selected to Cancel This input query"
     
  EndIf
  
  
  Sync
  WaitKey
  
  
  
  
  
 
Related Info: InputQuery :
 


(c) Copyright 2002 - 2024 - Kevin Picone - PlayBASIC.com